package com.rules.admin.vo;



import com.rules.admin.entity.BusinessModel;
import com.rules.admin.entity.RulePackage;
import com.rules.admin.entity.RuleVariable;

import java.util.List;

public class PackageVO extends RulePackage {
   private List<RuleVariable> ruleVariables;
   private BusinessModel businessModel;

   public List<RuleVariable> getRuleVariables() {
      return this.ruleVariables;
   }

   public BusinessModel getBusinessModel() {
      return this.businessModel;
   }

   public void setRuleVariables(List<RuleVariable> ruleVariables) {
      this.ruleVariables = ruleVariables;
   }

   public void setBusinessModel(BusinessModel businessModel) {
      this.businessModel = businessModel;
   }

   //TODO
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof PackageVO)) {
         return false;
      } else {
         PackageVO other = (PackageVO)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            Object this$ruleVariables = this.getRuleVariables();
            Object other$ruleVariables = other.getRuleVariables();
            if (this$ruleVariables == null) {
               if (other$ruleVariables != null) {
                  return false;
               }
            } else if (!this$ruleVariables.equals(other$ruleVariables)) {
               return false;
            }

            Object this$businessModel = this.getBusinessModel();
            Object other$businessModel = other.getBusinessModel();
            if (this$businessModel == null) {
               if (other$businessModel != null) {
                  return false;
               }
            } else if (!this$businessModel.equals(other$businessModel)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(Object other) {
      return other instanceof PackageVO;
   }

   //TODO
   public int hashCode() {

      int result = 1;
      Object ruleVariables = this.getRuleVariables();
      result = result * 59 + (ruleVariables == null ? 43 : ruleVariables.hashCode());
      Object businessModel = this.getBusinessModel();
      result = result * 59 + (businessModel == null ? 43 : businessModel.hashCode());
      return result;
   }

   public String toString() {
      return "PackageVO(ruleVariables=" + this.getRuleVariables() + ", businessModel=" + this.getBusinessModel() + ")";
   }
}
